package day7;

public class Pet {
    private String name;
    private int health;

    public Pet() {
    }

    public Pet(String name, int health) {
        this.name = name;
        this.health = health;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHealth() {
        return health;
    }

    public void setHealth(int health) {
        this.health = health;
    }

    public void introduce() {
        System.out.println("宠物叫" + name + ",体力为" + health);
    }
}